using System;
using System.Collections.Generic;
using System.Text;

namespace My.IdlConverter.Registration
{
    public class AddinRange
    {
        private Int64 _first;
        private Int64 _last;

        public AddinRange(Int64 first,Int64 last)
        {
            _first = first;
            _last = last;
        }

        public Int64 First
        {
            get { return _first; }
            set { _first = value; }
        }

        public Int64 Last
        {
            get { return _last; }
            set { _last = value; }
        }

        public bool Contains(Int64 id)
        {
            if ((id >= _first) && (id <= _last))
                return true;
            return false;
        }

        public static AddinRange GetIdlConverterRange()
        {
            return new AddinRange(0xe0000000, 0xe00fff00);
        }

        public static AddinRange GetIdlConverterFormalRange()
        {
            return new AddinRange(0xe0000000, 0xe00f0000);
        }

        public static AddinRange GetIdlConverterTestRange()
        {
            return new AddinRange(0xe00f0100, 0xe00fff00);
        }

        public static AddinRange GetExternalRange()
        {
            return new AddinRange(0xe0100100, 0xefffff00);
        }

        public static AddinRange GetSpecialRange()
        {
            return new AddinRange(0xe0100000, 0xe0100000);
        }
    }
}
